import { useEffect, useState } from "react";
import { getChannelApi } from "../apis/article";

export const useChannelLsit = () => {
  const [channelList, setChannelList] = useState([]);
  useEffect(() => {
    const getChanneList = async () => {
      const res = await getChannelApi();
      setChannelList(res.data.channels);
    };
    getChanneList();
  }, []);
  return {
    channelList,
    setChannelList,
  };
};
